package com.kevin.kafka.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.config.TopicBuilder;

/**
 * @author Kevin Liu
 * @date 2020/8/5 上午11:29
 */
@Configuration
public class KafkaConfig {

    @Bean
    public NewTopic newTopic(){
        return TopicBuilder.name("test")
                .replicas(1)
                .partitions(2)
                .build();
    }
}
